package com.campusexpresspickup.service.impl;

import com.campusexpresspickup.mapper.UserResourceMapper;
import com.campusexpresspickup.service.IUserResourceService;
import com.campusexpresspickup.entity.UserResource;
import com.campusexpresspickup.page.UserResourcePage;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import java.util.List;
import org.springframework.stereotype.Service;

/**
 * <p>
 * 后台资源表 服务实现类
 * </p>
 *
 * @author lq
 * @since 2021-11-15
 */
@Service
public class UserResourceServiceImpl extends
    ServiceImpl<UserResourceMapper, UserResource> implements IUserResourceService {

  private final UserResourceMapper userResourceMapper;

  public UserResourceServiceImpl(UserResourceMapper userResourceMapper) {
    this.userResourceMapper = userResourceMapper;
  }

  @Override
  public List<UserResource> getUserResourceList(UserResourcePage userResourcePage) {
    return userResourceMapper.findUserResourceList(userResourcePage);
  }

  @Override
  public Long getCountByExample(String name) {
    return userResourceMapper.countByName(name);
  }
}
